import React, {Component} from "react";
import {  Route, Routes} from "react-router-dom";
import Home from "./pages/Home";
import Header from './components/Header'
import MyNavLink from "./components/MyNavLink";
import About from "./pages/About";


export default class App extends Component {

    render() {
        return (
            <div>
                <div className="row">
                    <div className="col-xs-offset-2 col-xs-8">
                        <Header/>
                    </div>
                </div>
                <div className="row">
                    <div className="col-xs-2 col-xs-offset-2">
                        <div className="list-group">

                            <MyNavLink  to="home">Home</MyNavLink>
                            <MyNavLink  to="about">About</MyNavLink>

                        </div>
                    </div>
                    <div className="col-xs-6">
                        <div className="panel">
                            <div className="panel-body">
                                <Routes>
                                    <Route path="/home" element={<Home/>}/>
                                    <Route path="/about" element={<About/>}/>
                                    <Route path="*" element={<Home/>}/>

                                </Routes>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        )
    }
}